Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Oracle® Ultra Search Java API Reference 10g Release 2 (10.2) B14221-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.ultrasearch.query
Class DisplayUtil

`java.lang.Object
oracle.ultrasearch.query.DisplayUtil`

public class DisplayUtil
extends java.lang.Object

Class DisplayUtil provides methods to display table and file data source contents.

Since:
  9.0.2

Constructor Summary
`DisplayUtil()` Default constructor
`DisplayUtil(boolean connClosed)` Deprecated.

Method Summary
`void` | `displayCachedDocument(int doc_id, Query query, java.lang.String startTag, java.lang.String endTag, java.lang.String prevTag, java.lang.String nextTag, java.io.Writer out)` Display the cached document with highlighting.
`void` | `displayFileUrl(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)` Call this method to display the contents of a file data source document.
`void` | `displayTableUrl(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)` Call this method to display the contents of a table data source (database row cell).
`void` | `setInstance(Instance inst)` Sets the Instance object used by the class to create database connections to the Ultra Search instance.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DisplayUtil

    public DisplayUtil()

  Default constructor

### DisplayUtil

    public DisplayUtil(boolean connClosed)

  Deprecated.

Method Detail

### setInstance

    public void setInstance(Instance inst)

  Sets the Instance object used by the class to create database connections to the Ultra Search instance.
  Parameters:
    `inst` - The instance object

### displayTableUrl

    public void displayTableUrl(javax.servlet.ServletRequest request,
                                javax.servlet.ServletResponse response)
                         throws java.io.IOException,
                                java.sql.SQLException

  Call this method to display the contents of a table data source (database row cell).

  This method makes a database call which returns the contents the database row cell. The table may reside on a separate database which must be accessible by the Ultra Search database via a database link.

  Parameters:
    `request` - The incoming Servlet request object containing all request data.
    `response` - The outgoing Servlet response object whose PrintWriter this method will print text to.
  Throws:
    `java.io.IOException` - when an error occurs during printing of text to the response object's PrintWriter.
    `java.sql.SQLException` - when a database error occurs.

### displayFileUrl

    public void displayFileUrl(javax.servlet.ServletRequest request,
                               javax.servlet.ServletResponse response)
                        throws java.io.IOException,
                               java.sql.SQLException

  Call this method to display the contents of a file data source document.

  This method makes a database call which returns the contents of the file. Therefore, the file must be accessible by the database server.

  Parameters:
    `request` - The incoming Servlet request object containing all request data.
    `response` - The outgoing Servlet response object whose PrintWriter this method will print text to.
  Throws:
    `java.io.IOException` - when an error occurs during printing of text to the response object's PrintWriter.
    `java.sql.SQLException` - when a database error occurs.

### displayCachedDocument

    public void displayCachedDocument(int doc_id,
                                      Query query,
                                      java.lang.String startTag,
                                      java.lang.String endTag,
                                      java.lang.String prevTag,
                                      java.lang.String nextTag,
                                      java.io.Writer out)
                               throws java.io.FileNotFoundException,
                                      java.lang.SecurityException,
                                      java.io.IOException,
                                      java.sql.SQLException

  Display the cached document with highlighting.
  Parameters:
    `doc_id` - the document id
    `query` - the query that returned this document
    `startTag` - char(s) inserted to indicate start of highlighted term
    `endTag` - char(s) inserted to indicate end of highlighted term
    `prevTag` - markup to navigate to the previous highlight
    `nextTag` - markup to navigate to the next highlight
    '%CURNUM' -- the current offset number
    '%PREVNUM' -- the previous offset number
    '%NEXTNUM' -- the next offset number
    `out` - the writer to output to.
  Throws:
    `java.io.FileNotFoundException` - when the cache file is not available
    `java.lang.SecurityException` - if the file is protected by access control
    `java.io.IOException` - if encountered exception writing to out.
    `java.sql.SQLException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Oracle® Ultra Search Java API Reference 10g Release 2 (10.2) B14221-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003,2005, Oracle. All Rights Reserved.